function login() {
    axios.get("/em/login", {
        params: {
            name: $("name").value,
            pwd: $("pwd").value
        }
    }).then(resp => {
        var info = resp.data;
        if (info == "") {
            $("loginInfo").innerHTML = "用户名或密码错误，登录失败";
            $("loginInfo").style.color = "red";
        } else {
            location.href = "/mails/main.html";
        }
    });
}